<?php slot('pageIntro') ?>
<!-- begin intro -->
<div class="intro_text">
    <div class="intro_content">
        <h4 style="text-align: center;">
            <?php echo __('"%client%" eelnenud küsitlused', array('%client%' => $node->getTitle())) ?>
        </h4>
    </div>  	  
</div>
<!-- end intro --> 
<?php end_slot() ?>

<?php slot('article') ?>
<!-- begin two third last -->
<div class="columns two_third last">
    <?php if (isset($selQuestionaire)): ?>
        <h5><?php echo $selQuestionaire->getName() ?></h5>
        <h6><?php echo $selQuestionaire->getDescription() ?></h6>
        <?php foreach ($selQuestionaire->getQuestions() as $question): ?>
            <h6><?php echo $question->getName(); ?></h6>
            <p>
                <?php foreach ($question->getAnswers() as $answer): ?>
                    <?php echo $answer->getLabel(); ?><br />
                <?php endforeach; ?>
            </p>
        <?php endforeach; ?>        
    <?php else: ?>
        <?php foreach ($questionaires as $questionaire): ?>
            <p>
                <a href="<?php echo LinkGen::getInstance(LinkGen::STRUCTURE)->link($pageNode->getId(), array('id' => $questionaire->getId())) ?>"><?php echo $questionaire->getName() ?></a><br />
                <span style="font-size: 0.9em;"><?php echo $questionaire->getDescription() ?></span>
            </p>
        <?php endforeach; ?>
    <?php endif; ?>
</div>
<!-- end two third last -->

<!-- begin one third -->
<div class="columns one_third">
    <?php if (isset($selQuestionaire)): ?>
        <a href="<?php echo LinkGen::getInstance(LinkGen::STRUCTURE)->link($pageNode->getId()) ?>"><?php echo __('Back'); ?></a>
    <?php endif; ?>
</div>
<!-- end one third -->
<?php end_slot() ?>